<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        ul,
        li{
            list-style: none;
        }
        a{
            text-decoration: none;
        }
        .nav{
            width: 850px;
            height: 100px;
            background-color: pink;
            margin: 0 auto;
        }
        .icon{
            float: left;
            padding: 0 10px;
            height: 100px;
            line-height: 100px;
        }
        a{
            color: #fff;
        }
        .foot{
            display: block;
            width: 100%;
            height: 1.5px;
            background-color: #ff6700;
            margin-top: -40px;
            opacity: 0;
        }
        .icon:hover a{
            color: #ff6700;
        }
        .icon:hover .foot{
            opacity: 1;
        }
    </style>
</head>
<body>
    <ul class="nav">
        <li class="icon">
            <a href="">xiaomi手机</a>
            <span class="foot"></span>
        </li>
        <li class="icon">
            <a href="">redmi红米</a>
            <span class="foot"></span>
        </li>
        <li class="icon">
            <a href="">电视</a>
            <span class="foot"></span>
        </li>
        <li class="icon">
            <a href="">笔记本</a>
            <span class="foot"></span>
        </li>
        <li class="icon">
            <a href="">平板</a>
            <span class="foot"></span>
        </li>
        <li class="icon">
            <a href="">家电</a>
            <span class="foot"></span>
        </li>
        <li class="icon">
            <a href="">路由器</a>
            <span class="foot"></span>
        </li>
        <li class="icon">
            <a href="">智能硬件</a>
            <span class="foot"></span>
        </li>
        <li class="icon">
            <a href="">服务</a>
            <span class="foot"></span>
        </li>
        <li class="icon">
            <a href="">社区</a>
            <span class="foot"></span>
        </li>
    </ul>
</body>
</html>